import 'package:flutter/material.dart';

class LaunchedEffect extends StatefulWidget {
  final VoidCallback? onLaunch;
  final Widget child;

  const LaunchedEffect({super.key, required this.child, this.onLaunch});

  @override
  State<StatefulWidget> createState() => _LaunchedEffectState();
}

class _LaunchedEffectState extends State<LaunchedEffect> {
  @override
  void initState() {
    super.initState();
    widget.onLaunch?.call();
  }

  @override
  Widget build(BuildContext context) => widget.child;
}
